apiVersion: v1
kind: Namespace
metadata:
  name: backend-ns

---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: backend
  namespace: backend-ns
  labels:
    app: backend
spec:
  replicas: 1
  selector:
    matchLabels:
      app: backend
  template:
    metadata:
      namespace: backend-ns
      labels:
        app: backend
      annotations:
        dapr.io/enabled: "true"
        dapr.io/app-id: "backend"
        dapr.io/app-port: "5000"
    spec:
      imagePullSecrets:
      - name: harbor-key
      containers:
      - name: backend
        image: 192.168.43.95/dapr/backend:{{tagversion}}
        ports:
        - containerPort: 5000
        imagePullPolicy: Always

---
apiVersion: v1
kind: Service
metadata:
  namespace: backend-ns
  name: backend-svc
spec:
  type: NodePort
  selector:
    app: backend
  ports:
    - port: 5000
      targetPort: 5000
      nodePort: 31110